package com.itsu.mysql.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.itsu.interfaces.entity.Score;
import com.itsu.interfaces.entity.TestSoulOption;
import com.itsu.interfaces.service.ScoreService;
import com.itsu.interfaces.service.TestSoulOptionService;
import com.itsu.mysql.mappers.ScoreMapper;
import com.itsu.mysql.mappers.TestSoulOptionMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class ScoreServiceImpl implements ScoreService {

    @Autowired
    ScoreMapper ScoreMapper;


    @Override
    public Score findByQidAndOid(Long questionId, Long optionId) {
        return ScoreMapper.selectOne(Wrappers.lambdaQuery(Score.class)
                .eq(Score::getQuestionsId, questionId)
                .eq(Score::getOptionId, optionId));
    }
}
